import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;


public class IO {
    public static void main(String[] args) throws IOException {
        long time = System.currentTimeMillis();
    	BufferedReader in = new BufferedReader(new FileReader(args[1]));
    	List<String> list = new LinkedList<String>();
    	String data;
    	do {
    		data = in.readLine();
    		list.add(data);
    		
    	} while (data != null);
    	PrintWriter out = new PrintWriter(new BufferedWriter (new FileWriter(args[0])));
    	Iterator<String> iter = list.iterator();
    	while (iter.hasNext()) {
    		out.println(iter.next());
    	}
    	out.close();
    	in.close();
    	System.out.println(System.currentTimeMillis() - time);
    }
}
